<template>
  <div class="search-content">
      <Form inline :label-width="170" ref="form"  :model="searchForm" label-position="right">
            <FormItem :label="item.name" v-for="(item, index) in label" :key="index">
                <Input v-model="searchForm.searchForm[item.key]" :placeholder="'请输入'+item.name"/>
            </FormItem>
            <!-- 留下一个插槽，可以添加下拉选择之类的 -->
            <slot></slot>
            <FormItem>
                <Button type="primary" @click="search">搜索</Button>
            </FormItem>
      </Form>
  </div>
</template>

<script>
export default {
    props: {
        searchForm: {
            type: Object
        },
        // label: [{name: '标题', key: 'key'}]
        label: {
            type: Array
        }
    },
    methods: {
        search () {

        }
    }
}
</script>

<style>
    .search-content{
        padding: 16px;
    }
</style>